package com.hbpu.schedule.service.impl;

import com.hbpu.schedule.dao.SysUserDao;
import com.hbpu.schedule.dao.impl.SysUserDaoImpl;
import com.hbpu.schedule.pojo.SysUser;
import com.hbpu.schedule.service.SysUserService;
import com.hbpu.schedule.util.MD5Util;

public class SysUserServiceImpl implements SysUserService {
    private SysUserDao sysUserDao = new SysUserDaoImpl();
    @Override
    public int addUser(SysUser sysUser) {
        sysUser.setUserPwd(MD5Util.encrypt(sysUser.getUserPwd()));
        return sysUserDao.addUser(sysUser);
    }

    @Override
    public SysUser userSelectByName(String username) {
        return sysUserDao.selectUserByName(username);
    }
}
